<%--
  User: jianzh5
  Date: 2015/7/9
  Time: 10:44
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx_path" value="<%=request.getContextPath() %>" />
<html>
<head>
    <meta xmlns="http://www.w3.org/1999/xhtml" name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <meta xmlns="http://www.w3.org/1999/xhtml" name="MobileOptimized" content="240" />
    <meta name="MobileOptimized" content="470" />
    <title>娱乐大杂烩 - 菠萝玩</title>
    <link type="text/css" href="${ctx_path}/resources/front/css/gbolbal_20141010.css" rel="stylesheet">
    <link rel="stylesheet" href="${ctx_path}/resources/front/css/bbslist.css?v=2013013007" type="text/css" >
    <script type="application/javascript" src="${ctx_path}/resources/front/js/menu.js"></script>
    <script language="javascript">
        if(top.location != location) top.location.href = location.href;
    </script>
</head>
<body>
<script>
    window.onload = function(){
        //alert("xixi");
        setMenuBackground();
    }
</script>
    <p id="top" class="top1 clearfix">
        <a class="logo" href="">
            <img src="${ctx_path}/resources/front/images/new_logo.png">
        </a>
        <%--<a href="" title="我的">
            <span class="touxiang">
                <img src="resources/front/images/jobs/person.gif"/>
            </span>
        </a>--%>
    </p>
    <div id="active_br"></div>
    <style>
        #link img{ max-width: 100%;}
        #oTop img{ max-width: 100%;}
        #oTop{width:100%; position:relative;}
        #oLink1{ position:absolute; top:0px; left:0px; width:14%; height:35%;}
        #oLink2{ position:absolute; top:0px; right:0px; width:86%; height:100%;}
        .nav a{width:20%;}
        .nav a.last{
            border-right:none;}
    </style>
    <%--<script language="javascript">
        var ua = navigator.userAgent,
            isIphone = /iPhone/.test(ua),
            isIpad = /iPad/.test(ua),
            isSafari = /Version/i.test(ua),
            version = /OS[7-9](_\d+){2}/i.test(ua),<!--/OS [7-9]_\d[_\d]/i.test(ua)-->
            isAndroid = /Android/i.test(ua) || /Linux/.test(ua);
            isMobile = /AppleWebKit.*Mobile.*/.test(ua); //是否是移动终端
        if(isIphone && !isIpad && !isSafari && version){
            var oLink = document.createElement('a');
            oLink.id='link';
            oLink.style.width="100%";
            oLink.href='../um0.cn/8MCBM/default.htm';
            oLink.innerHTML = '<img width="640" src="resources/front/images/WAP-IOS.jpg">';
            var logo = document.getElementById('top');
            document.body.insertBefore(oLink,logo);
        }
        if(isMobile && isAndroid && !isIpad){
            var oTop = document.createElement('div');
            oTop.id = 'oTop';
            active_br.innerHTML = '<a href=""><img style="width:100%; max-width:100%" src="resources/front/images/WAP-Android-new.jpg"></a><a href="javascript:;" id="oLink1"></a>';
            document.getElementById('oLink1').onclick = function(){
                active_br.style.display = 'none';
            }
        }
    </script>--%>
    <%@include file="nav.jsp" %>

    <div id="main">
        <c:forEach items="${page.records}" var="article">
            <div class="article-list">
                <div class="img">
                    <a href="${ctx_path}/new/${article.id}"><img src="${article.logourl}" style="display: inline"/></a>
                </div>
                <div class="content">
                    <a href="${ctx_path}/new/${article.id}"> <h1>${article.title}</h1></a>
                    <div class="summary">
                            ${article.summary}( ${article.viewtimes} 浏览)
                    </div>
                </div>
                <div class="clearfix"></div>

            </div>
        </c:forEach>
    </div>
    <c:set var="prePage" value="./?cpage=${page.cpage-1}&size=${page.size}"></c:set>
    <c:set var="nextPage" value="./?cpage=${page.cpage+1}&size=${page.size}"></c:set>
    <div class="pageli">
        <a class="previous" href="${page.hasPrepage ? prePage : ''}">上一页</a>
        <a class="nextpage" href="${page.hasNextpage ? nextPage : ''}">下一页</a>
    </div>
    <div class="clear"></div>

    <%@include file="footer.jsp"%>

</body>
</html>
